<template>
  <div>
    <h1>组合式语法糖写法</h1>
    <h1 v-text="num"></h1>
    <button @click="add">+1</button>
  </div>
</template>

<script setup>
import { ref } from "vue";
const num = ref(0);
const add = () => {
  num.value++;
};
</script>

<style lang="scss" scoped>
</style>